<?php 
if($list)
{
	foreach($list as $book)
	{
?>
<p>
	<b><big><a href="<?php echo url('wap-book/id/'.$book['book_id']);?>"><?php echo $book['title']; ?></a></big></b><br/>
	<i><small>字节数:<?php echo $book['length']; ?><br/>添加时间:<?php echo date('Y/m/d H:m', $book['addtime']); ?></small></i><br/>
	<?php echo $book['desc']; ?>
</p>
<?php 
	}

	$tmp	=	'<p id="pager">';
	$tmp	.=	($pager['p_offset'] <=1)
					? '<a>首页</a> <a>上一页</a> '
					: "<a href='".sprintf($pager['url'], 1)."'>首页</a> "
					. "<a href='".sprintf($pager['url'], $pager['p_offset']-1)."'>上一页</a> ";
	$tmp	.=	' ';
	$tmp	.=	($pager['p_offset'] >= $pager['p_total'])
					? '<a>下一页</a> <a>尾页</a> '
					: "<a href='".sprintf($pager['url'], $pager['p_offset']+1)."'>下一页</a> "
					. "<a href='".sprintf($pager['url'], $pager['p_total'])."'>尾页</a> ";
	$tmp	.=	" <span>{$pager['r_total']}[{$pager['p_offset']}/{$pager['p_total']}]</span>";
	$tmp	.=	'</p>';
	echo $tmp;
	
}
?>